
.title-format-editor {
	margin-bottom: 20px;

	&.disabled {
		.title-format-editor__editor-wrapper {
			border: 1px solid var( --color-neutral-10 );
			background-color: var( --color-neutral-0 );
		}

		.title-format-editor__token,
		.title-format-editor__button {
			pointer-events: none;
		}

		.title-format-editor__token {
			background-color: var( --color-neutral-light );
		}
	}
}

.title-format-editor__header {
	display: flex;
	align-items: baseline;
	justify-content: flex-end;
	flex-wrap: wrap-reverse;
	margin-bottom: 6px;
}

.title-format-editor__title {
	font-weight: 600;
	font-size: 14px;
	flex: 1;
	margin-right: auto;
}

.title-format-editor__button {
	border-radius: 3px;
	background-color: var( --color-surface );
	color: var( --color-neutral-60 );
	border: 1px solid var( --color-neutral-10 );
	padding: 3px 8px;
	margin-left: 10px;
	margin-top: 3px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;

	&::before {
		content: '+';
		margin-right: 4px;
		font-weight: 600;
	}

	&:hover {
		color: var( --color-accent );
	}
}

.title-format-editor__editor-wrapper {
	border: 1px solid var( --color-neutral-20 );
	padding: 7px 14px;
	line-height: 24px;
}

.title-format-editor__token {
	display: inline-block;
	background-color: var( --color-neutral-50 );
	color: var( --color-text-inverted );
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;

	&:hover {
		background-color: var( --color-error );
	}
}

.title-format-editor__token-close {
	margin-left: 10px;
	color: var( --color-neutral-20 );
	font-size: 10px;
}

.title-format-editor__preview {
	color: var( --color-neutral-light );
	font-style: italic;
	margin-top: 5px;
	font-size: 13px;
}
